//
//  WCRecordTimeCell.m
//  WC
//
//  Created by wsj2015 on 16/1/25.
//  Copyright © 2016年 ShanghaiCize Trade And Business Co., Ltd. All rights reserved.
//

#import "WCRecordTimeCell.h"
#import "WSJPickView.h"

@implementation WCRecordTimeCell

- (void)awakeFromNib {
    // Initialization code
    
    self.timeTf.delegate =self;
    
    self.bgView.layer.borderColor =kBorderColor.CGColor;
    self.bgView.layer.borderWidth =1;
    self.bgView.layer.cornerRadius = 5;
    self.bgView.layer.masksToBounds = YES;
    
    
    [self.contentView setBackgroundColor:kAppBg];
    
    
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

   
}
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField
{
    WSJPickView *picker =[WSJPickView pickView];
    picker.pickTitle  =@"权限选择";
    if (self.titleArray) {
        picker.dataArray  =self.titleArray;
    }
    weakSelf_define;
    picker.saveBlock= ^(NSString *titel, NSInteger index){
        if (weakSelf.saveBlock) {
            weakSelf.saveBlock(titel,index);
        }
    };
    
    
    [picker show];
    
    return NO;


}
- (void)setEditAable:(BOOL)editAable{
    _editAable = editAable;
    self.timeTf.enabled = editAable;

}



@end
